﻿<%@ Page Language="C#" MasterPageFile="~/ffl/ffl.master" AutoEventWireup="true" CodeFile="ManagerOfMonth.aspx.cs" Inherits="ffl_admin_ManagerOfMonth" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <form runat="server">
        <asp:Panel runat="server" ID="AddPanel">
            <table width="100%" cellspacing="0" cellpadding="0">
                <tr>
                    <td>Team</td>
                    <td><asp:DropDownList runat="server" ID="TeamDropDown"></asp:DropDownList></td>
                </tr>
                <tr>
                    <td>Month</td>
                    <td><asp:DropDownList runat="server" ID="MonthDropDown"></asp:DropDownList></td>
                </tr>
                <tr>
                    <td>Points</td>
                    <td><asp:TextBox runat="server" ID="PointsTextBox" Text="20" Width="30"></asp:TextBox></td>            
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Button runat="server" ID="AddButton" Text="Add" 
                            onclick="AddButton_Click" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Repeater runat="server" ID="ManagerOfMonthRepeater" OnItemCommand="ManagerOfMonthRepeater_ItemCommand">
            <HeaderTemplate>
                <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td class="tableheader">Team</td>
                        <td class="tableheader">Month</td>
                        <td class="tableheader" align="center">Points</td>
                        <td class="tableheader">Action</td>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <asp:HiddenField runat="server" ID="IdHidden" Value='<%# DataBinder.Eval(Container.DataItem, "ManagerOfMonthId") %>' />
                    <td><%# DataBinder.Eval(Container.DataItem, "Forename") + " " + DataBinder.Eval(Container.DataItem, "Surname") + " (" + DataBinder.Eval(Container.DataItem, "TeamName") + ")" %></td>
                    <td><%# new DateTime(2010, Convert.ToInt32(DataBinder.Eval(Container.DataItem, "MonthNumber")),1).ToString("MMMM") %></td>
                    <td align="center"><%# DataBinder.Eval(Container.DataItem, "Points") %></td>
                    <td>
                        <asp:Button runat="server" ID="DeleteButton" Text="Remove"/>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        
        
    </form>
</asp:Content>

